Extend histogram bucket cap for HTTP and catalog metadata update timers#567
Merged
cbb330 merged 1 commit intolinkedin:mainfrom May 1, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The p99 latency alert for
PUT /v1/databases/{databaseId}/tables/{tableId}on tables-service was saturating at exactly ~31s, regardless of how slow snapshot commits actually got. Investigation showed this is not a real timeout — it's aMicrometer histogram artifact:
application.propertiesenablesmanagement.metrics.distribution.percentiles-histogram.all=true, so all timers publish histograms.Timer.maximumExpectedValueis 30s. The pre-computedPercentileHistogramBucketstable is truncated at this cap, with the highest finite bucket near ~30.5s (rounded to ~31s in dashboards).+Infbucket and is invisible tohistogram_quantile, so p99/max visually pin at 31s.catalog_metadata_retrieval_latency=600sproved this; the same pattern was missing for the HTTP server timer and the catalog update timer, both of which can legitimately exceed 30s during metastore contention.Max latency is always capped at 31s although put snapshot takes higher:

Changes
maximumExpectedValueforhttp.server.requestsandcatalog_metadata_update_latencyin tables-service, raising them to 600s.services/tables/src/main/resources/application.propertiesmaximum-expected-value.catalog_metadata_update_latency=600smaximum-expected-value.http.server.requests=600s(Spring's auto-instrumented HTTP timer; exported to Prometheus ashttp_server_requests_seconds)services/tables/src/test/java/.../MetricsHistogramConfigurationTest.javatestMaxExpectedValueConfigurationIsSetForUpdateLatency,testMaxExpectedValueConfigurationIsSetForHttpServerRequests).assertTimerHistogramExtendsTo600s(...).Issue] Briefly discuss the summary of the changes made in this
pull request in 2-3 lines.
Changes
For all the boxes checked, please include additional details of the changes made in this pull request.
Testing Done
./gradlew :services:tables:test --tests "MetricsHistogramConfigurationTest"— all 9 tests pass (3 new + 6 existing).For all the boxes checked, include a detailed description of the testing done for the changes made in this pull request.
Additional Information
For all the boxes checked, include additional details of the changes made in this pull request.